//
// Created by 86138 on 2025/6/25.
//

#ifndef QINGDAO_UNIVERSITY_SELECTIONSORT_H
#define QINGDAO_UNIVERSITY_SELECTIONSORT_H
#include "../01-intro/c1-1.h"

namespace sweetcookie10_3 {
    typedef int KeyType;
    typedef int InfoType;

    struct RedType { // Record Type
        KeyType key;
        InfoType otherinfo;
    };

    #define MAXSIZE 20
    struct SqList {
        RedType base[MAXSIZE + 1];
        int length;
    };

    typedef SqList HeapType;

    void HeapAdjust(HeapType &H, int s, int m, Boolean flag);

    void HeapSort(HeapType &H, Boolean flag);
}
#endif //QINGDAO_UNIVERSITY_SELECTIONSORT_H
